package com.cskaoyan.service.impl;

import com.cskaoyan.bean.CskaoyanmallComment;
import com.cskaoyan.mapper.CskaoyanmallCommentMapper;
import com.cskaoyan.service.CommentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommentServiceImpl implements CommentService {
    @Autowired
    CskaoyanmallCommentMapper cskaoyanmallCommentMapper;

    @Override
    public Integer selectHasPicCount(Integer valueId) {

        Integer i = cskaoyanmallCommentMapper.selecHasPicCount(valueId);
        return i;
    }

    @Override
    public Integer selectAllCount(Integer valueId) {
        Integer i = cskaoyanmallCommentMapper.selectAllCount(valueId);
        return i;
    }

    @Override
    public List<Integer> selectUserIdByValueId(Integer valueId) {
        List<Integer> integerList = cskaoyanmallCommentMapper.selectUserIdByValueId(valueId);
        return integerList;
    }

    @Override
    public List<String> selectAddTimeByValueId(Integer valueId) {
        List<String> strings = cskaoyanmallCommentMapper.selectAddTimeByValueId(valueId);
        return strings;
    }

    @Override
    public List<CskaoyanmallComment> selecAllByValueId(Integer valueId) {
        List<CskaoyanmallComment> commentList = cskaoyanmallCommentMapper.selectAllByValueId(valueId);
        return commentList;
    }

    @Override
    public CskaoyanmallComment selectAll(int i) {
        CskaoyanmallComment comment = cskaoyanmallCommentMapper.selectByPrimaryKey(i);
        return comment;
    }
}
